{% extends 'base.html' %}
{% load staticfiles %}
{% block css %}
    <link rel="stylesheet" href="{% static 'style.css' %}">
{% endblock %}
{% block content %}
<div class="container">
    <div class="col-md-4 col-md-offset-8">
      <form class='form-login' action="{% url 'login:login' %}" method="post">
              {% if message %}
            <div class="alert alert-warning">{{ message }}</div>
        {% endif %}
          <h2 class="text-center">欢迎登录</h2>

          <div class="form-group">
              {{ form.username.label_tag }}
              {{ form.username }}
          </div>

          <div class="form-group">
              {{ form.password.label_tag }}
              {{ form.password }}
          </div>

          <div class="form-group">
              {{ form.captcha.errors }}
              {{ form.captcha.label_tag }}
              {{ form.captcha }}
          </div>

{#          <div class="form-group">#}
{#            <label for="id_username">用户名：</label>#}
{#            <input type="text" name='username' class="form-control" id="id_username" placeholder="Username" autofocus required>#}
{#          </div>#}
{#          <div class="form-group">#}
{#            <label for="id_password">密码：</label>#}
{#            <input type="password" name='password' class="form-control" id="id_password" placeholder="Password" required>#}
{#          </div>#}

          {% csrf_token %}
          <button type="reset" class="btn btn-default pull-left">重置</button>
          <button type="submit" class="btn btn-primary pull-right">提交</button>
      </form>
    </div>
</div> <!-- /container -->

{% endblock %}